<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.9/vue.common.dev.js"></script> -->
</head>

<body>
    <div id="app">
        {{msg}}
        <h3>{{ msg }}</h3>
        <p>{{ count }}</p>
        <h1>v-text</h1>
        <p v-text="msg"></p>
        <input type="text" v-model="count">
        <button type="button" v-on:click="increase">add+</button>
        <button type="button" v-on:click="changeMessage">change message!</button>
        <button type="button" v-on:click="recoverMessage">recoverMessage!</button>
    </div>

    <script type="module">
        import miniVue from './js/miniVue.js';
        
        const app = new miniVue({
            el: "#app",
            data: {
                msg: "hello,mini vue.js",
                count: 666
            },
            methods: {
                increase() {
                    this.count++;
                },
                changeMessage() {
                    this.msg = "hello,eveningwater!";
                },
                recoverMessage() {
                    this.msg = "hello,mini vue.js";
                }
            }
        });
    </script>
</body>

</html>